<extend name="Index:base" />
<block name="title"><title>限时折扣</title></block>
<block name="style">
 <style>
.main,.panel-default>.panel-heading{
background:none;
}
body{
background:none;
}
.panel.panel-default,.panel .panel-body,.panel .panel-heading,.table-bordered {
	border:none;
}
.table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td {
	border:none;		
	padding:15px;	
	line-height:8px;
	height: 8px;
	border-top: 1px solid #d4d4d4;
	border-bottom: 1px solid #d4d4d4;
}
.name strong{
color:#000000;
font-size:15px;
font-weight:600;
}
.name {
	color:#20a8d8;
	font-size:12px;
}
.smallfont {
	color:#9c9c9c;
	font-size:12px;
}

.align-center{
	text-align:center; 
}
.title2{
text-align:center;
}
.table-bordered > tbody > tr .wd{
	text-align:left;	
}

.col-xs-2,.col-xs-4{
padding-right:0;
margin:10px 0;
}
.col-sm-3{
width:10%;
}
.col-sm-2{
width:8%;
}
.col-sm-1{
width:5%;
}
.col-sm-4{
width:18%;
}
.col-sm-1,.col-sm-2{
margin:16px 0;
}
.col-sm-3,.col-sm-4{
margin:10px 0;
}
.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4{
padding-right:0;
}
 </style>
    <link type="text/css" href="__PUBLIC__/Home/css/jquery-ui-1.8.17.custom.css" rel="stylesheet" />
     <link type="text/css" href="__PUBLIC__/Home/css/jquery-ui-timepicker-addon.css" rel="stylesheet" />

</block>
	<!-- start: Header -->
<block name="body">

			<!-- end: Main Menu -->
						
		<!-- start: Content -->
		<div class="main ">
		
			<div class="row">
				<div class="col-lg-12">
					<h3 class="page-header"><i class="fa fa-life-bouy"></i>限时折扣</h3>
				</div>
			</div>

			<div class="row">
				<div class="col-md-12">
			        <div class="panel panel-default">
						<div class="panel-heading">
							
							<a class="btn btn-default " href="{:U('Operate/index')}" >活动管理</i></a>&nbsp;&nbsp;&nbsp;
							<if condition="$type eq 'add'">
							<h2><span class="break"></span><strong>添加活动</strong></h2>
							</if>
							<if condition="$type eq 'edit'">
							<h2><span class="break"></span><strong>编辑活动</strong></h2>
							</if>							
						</div>&nbsp;&nbsp;&nbsp;
						<div class="panel-body" style="width: 50%;">
							<form action="{:U('Operate/xianshi_add')}" method="post" enctype="multipart/form-data" class="form-horizontal ">
				                <div class="form-group">
				                    <label class="col-md-3 control-label" for="text-input"><font style="color:red;">*</font>&nbsp;&nbsp;活动名称：</label>
				                    <div class="col-md-9">
				                        <input type="text" id="xianshi_name" name="xianshi_name" class="form-control" value="{$xianshi.xianshi_name}">
				                        <span class="help-block"></span>
				                    </div>
				                </div>
								<div class="form-group">
									<label class="col-md-3 control-label" for="select">活动标题：</label>
				                    <div class="col-md-9">
				                        <input type="text" id="xianshi_title" name="xianshi_title" class="form-control" value="{$xianshi.xianshi_title}">
				                        <span class="help-block">	活动标题是商家对限时折扣活动的别名操作，请使用例如“新品打折”、“月末折扣”类短语表现，最多可输入10个字符；<br>非必填选项，留空商品优惠价格前将默认显示“限时折扣”字样。</span>
				                    </div>
								</div>	
								<div class="form-group">
									<label class="col-md-3 control-label" for="select">活动描述：</label>
				                    <div class="col-md-9">
				                        <input type="text" id="xianshi_explain" name="xianshi_explain" class="form-control" value="{$xianshi.xianshi_explain}">
				                        <span class="help-block">	活动描述是商家对限时折扣活动的补充说明文字，在商品详情页-优惠信息位置显示；<br>非必填选项，最多可输入30个字符。</span>
				                    </div>
								</div>	
				                <div class="form-group">
				                    <label class="col-md-3 control-label" for="text-input"><font style="color:red;">*</font>&nbsp;&nbsp;开始时间：</label>
				                    <div class="col-md-9">
				                        <input type="text" id="start_time" name="start_time" class="form-control ui_timepicker" value="<if condition="$xianshi.start_time neq ''">{$xianshi.start_time|=date('Y-m-d h:i:s',###)}</if>">
				                        <span class="help-block"></span>
				                    </div>
				                </div>
				                <div class="form-group">
				                    <label class="col-md-3 control-label" for="text-input"><font style="color:red;">*</font>&nbsp;&nbsp;结束时间：</label>
				                    <div class="col-md-9">
				                        <input type="text" id="end_time" name="end_time" class="form-control ui_timepicker" value="<if condition="$xianshi.end_time neq ''">{$xianshi.end_time|=date('Y-m-d h:i:s',###)}</if>">
				                        <span class="help-block"></span>
				                    </div>
				                </div>
				                <div class="form-group">
				                    <label class="col-md-3 control-label" for="text-input">&nbsp;&nbsp;购买上限：</label>
				                    <div class="col-md-3">
				                        <input type="text" id="lower_limit" name="lower_limit" class="form-control" value="{$xianshi.lower_limit}">
				                       
				                    </div>
									<span class="help-block"><span style="color:red;">件&nbsp;&nbsp;</span>参加活动的最高购买数量，默认为0，0为无限制</span>
				                </div>	
				                <div class="form-group">
				                    <label class="col-md-3 control-label" for="text-input">&nbsp;&nbsp;商家可参与商品数量：</label>
				                    <div class="col-md-9">
				                        <input type="text" id="goods_number" name="goods_number" class="form-control" value="{$xianshi.goods_number}">
				                        <span class="help-block">参加活动的商家最多可发布商品数量，默认为0，0为无限制</span>
				                    </div>
									
				                </div>									
				                <div class="form-group">
				                    <label class="col-md-3 control-label" for="text-input">&nbsp;&nbsp;是否需要审核：</label>
				                    <div class="col-md-9">
				                       <select id="xianshi_shenhe" name="xianshi_shenhe" class="form-control" size="1">
											<if condition="$xianshi.xianshi_shenhe eq '2'">
												<option value="2">否</option>
											   <option value="1">是</option>
											<elseif condition="$xianshi.xianshi_shenhe eq '1'"/>
											<option value="1">是</option>
											<option value="2">否</option>
											<else/>
												<option value="2">否</option>
											   <option value="1">是</option>		
											</if>
				                        </select>
				                        <span class="help-block">参加活动的最低购买数量，默认为0，0为无限制</span>
				                    </div>
				                </div>	
				                <div class="form-group">
				                    <label class="col-md-3 control-label" for="email-input">&nbsp;</label>
				                    <div class="col-md-3">
				                        <img class="img-thumbnail" src="{$xianshi.xianshi_pic}" >
				                    </div>
				                </div>									
				                <div class="form-group">
				                    <label class="col-md-3 control-label" for="email-input">活动图片上传:</label>
				                    <div class="col-md-9">
				                        <input type="file" id="file-input" name="xianshi_pic" >
										<span class="help-block">为确保显示效果正确，请选择最小不低于W:776px H:300px、最大不超过W:1920px H:481px的清晰图片作为全屏焦点图。</span>
				                    </div>
				                </div>
				                <div class="form-group">
				                    <label class="col-md-3 control-label" for="text-input">&nbsp;&nbsp;活动所在位置：</label>
				                    <div class="col-md-9">
				                       <select id="xianshi_type" name="xianshi_type" class="form-control" size="1">
											<if condition="$xianshi.xianshi_type eq '2'">
												<option value="2">商城活动专题页</option>
											   <option value="1">商城首页</option>
											<elseif condition="$xianshi.xianshi_type eq '1'"/>
											<option value="1">商城首页</option>
											<option value="2">商城活动专题页</option>
											<else/>
												<option value="2">商城活动专题页</option>
											   <option value="1">商城首页</option>
											</if>
				                        </select>
				                        <span class="help-block">活动所在商城位置，默认为2，1为商城首页，2为商城活动专题页</span>
				                    </div>
				                </div>						
								<br>
				            
						</div>
						<div class="panel-footer" style="border:none">
							<input type="hidden" id="xianshi_id" name="xianshi_id" value="{$xianshi.xianshi_id}">
		                    <button type="submit" class="btn btn-bg btn-success"><i class="fa fa-dot-circle-o"></i> 确定</button>
		                </div>
					</form>						
			        </div>	
			    </div>			

			
			</div><!--/row				
			
		<!-- end: Content -->
		<br><br><br>
		
	</div><!--/container-->

</block>
<block name="script">
    <script type="text/javascript" src="__PUBLIC__/Home/js/jquery-1.7.1.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Home/js/jquery-ui-1.8.17.custom.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Home/js/jquery-ui-timepicker-addon.js"></script>
    <script type="text/javascript" src="__PUBLIC__/Home/js/jquery-ui-timepicker-zh-CN.js"></script>
    <script type="text/javascript">
    $(function () {
        $(".ui_timepicker").datetimepicker({
            //showOn: "button",
            //buttonImage: "./css/images/icon_calendar.gif",
            //buttonImageOnly: true,
            showSecond: true,
            timeFormat: 'hh:mm:ss',
            stepHour: 1,
            stepMinute: 1,
            stepSecond: 1
        })
    })
    </script>
</block>	









